# 一个子类继承多个父类
# 父亲类
class Father(object):
    def __init__(self, surname):
        self.surname = surname

    def make_money(self):
        print("钱难挣,粑粑难吃!")


# 母亲类
class Mother(object):
    def __init__(self, height):
        self.height = height

    def eat(self):
        print("一言不合,就干饭!")


# 子类
class Son(Father, Mother):  # 子类继承多个父类时,在参数列表中,传入多个父类名称即可
    def __init__(self, surname, height, weight):
        # 继承父类的构造函数
        Father.__init__(self, surname)
        Mother.__init__(self, height)
        self.weight = weight

    def play(self):
        print("哪有什么岁月静好,只不过有人再替你负重前行.就这么飞倍爽!")


son = Son("奇奇", 178, 118)
print(son.surname)
print(son.height)
print(son.weight)
son.make_money()
son.eat()
son.play()
